Optimized ventilation